package com.itheima.manager.mapper;

import com.itheima.manager.pojo.Contact;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface ContactMapper {

    @Select("select * from contact")
    public List<Contact> selectAll();




    public Contact selectAllByName(String name);

    public void add(Contact contact);

    @Delete("delete from contact where id=#{id}")
    public void detete(Integer id);

    @Select("select * from contact where id=#{id}")
    public Contact selectAllById(Integer id);


    public List<Contact> selectAllByNameAndAge(Map map);


    public List<Contact> selectLimit(Map map);

}
